package com.cnswhy.cloud.server.system.dto;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.cnswhy.cloud.common.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 * <p>
 * 实体类
 * 菜单表
 * </p>
 *
 * @author cnswhy
 * @since 2020-10-08
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = false)
@Builder
@ApiModel(value = "MenuSaveDTO", description = "菜单表")
public class MenuSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 上级菜单ID
     */
    @ApiModelProperty(value = "上级菜单ID")
    @NotNull(message = "上级菜单ID不能为空")
    private Long parentId;
    /**
     * 菜单/按钮名称
     */
    @ApiModelProperty(value = "菜单/按钮名称")
    @NotEmpty(message = "菜单/按钮名称不能为空")
    @Length(max = 50, message = "菜单/按钮名称长度不能超过50")
    private String menuName;
    /**
     * 对应路由path
     */
    @ApiModelProperty(value = "对应路由path")
    @Length(max = 255, message = "对应路由path长度不能超过255")
    private String path;
    /**
     * 对应路由组件component
     */
    @ApiModelProperty(value = "对应路由组件component")
    @Length(max = 255, message = "对应路由组件component长度不能超过255")
    private String component;
    /**
     * 权限标识
     */
    @ApiModelProperty(value = "权限标识")
    @Length(max = 50, message = "权限标识长度不能超过50")
    private String perms;
    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    @Length(max = 50, message = "图标长度不能超过50")
    private String icon;
    /**
     * 类型 0菜单 1按钮
     */
    @ApiModelProperty(value = "类型 0菜单 1按钮")
    @NotEmpty(message = "类型 0菜单 1按钮不能为空")
    @Length(max = 2, message = "类型 0菜单 1按钮长度不能超过2")
    private String type;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Double orderNum;

}
